<template>
  <div class="box-code">
    <div class="el-image-box">
      <el-image
        v-if="rowInfo.boxType == 2 && rowInfo.isIotTrust == 0"
        :src="require('@/assets/images/yq.png')"
        fit="fill"
        alt="云窍"
      ></el-image>

      <el-image
        v-if="rowInfo.boxType == 2 && rowInfo.isIotTrust == 1"
        :src="require('@/assets/images/ant/yq.png')"
        fit="fill"
        alt="云窍"
      ></el-image>

      <el-image
        v-if="rowInfo.boxType == 5 && rowInfo.isIotTrust == 0"
        class="dq-box"
        :src="require('@/assets/images/dq.png')"
        fit="fill"
        alt="档案窍"
      ></el-image>
      <el-image
        v-if="rowInfo.boxType == 5 && rowInfo.isIotTrust == 1"
        class="dq-box"
        :src="require('@/assets/images/ant/dq.png')"
        fit="fill"
        alt="档案窍"
      ></el-image>

      <el-image
        v-if="rowInfo.boxType == 7"
        :src="require('@/assets/images/ant/cont.svg')"
        fit="fill"
        alt="容器"
      ></el-image>
    </div>

    <div class="box-title">
      <p>{{ commonFun.getLabel(boxType, rowInfo.boxType) }}</p>
      <p class="code" @click="goDetail">{{ rowInfo.boxCode }}</p>
      <span>{{ commonFun.getLabel(orderStatus, rowInfo.orderStatus) }}</span>
    </div>
  </div>
</template>
<script>
import { boxTypeAll, orderStatus } from "@/utils/dictionary.js";
export default {
  name: "BoxIconShow",
  props: {
    rowInfo: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      boxType: boxTypeAll,
      orderStatus: orderStatus,
    };
  },
  mounted() {},
  methods: {
    goDetail() {
      this.$emit('goDetail')
    }
  },
};
</script>
<style lang="scss" scoped>
.box-code {
  display: flex;
  align-items: center;
  .el-image-box {
    height: 60px;
    width: 80px;
    margin-right: 10px;
    text-align: center;
    .el-image {
      height: 100%;
    }
  }

  .box-title {
    color: #333;
    font-size: 12px;
    font-weight: 550;
    line-height: 22px;
    .code {
      cursor: pointer
    }
  }
}
</style>
